package com.wb.mas.entity;

import android.content.Context;

import com.wb.mas.R;

import java.io.Serializable;

/**
 * Copyright (C) 2018,
 * OrderEntity
 * <p>
 * Description
 * 订单的实体类
 *
 * @author mwl
 * @version 1.0
 * <p>
 * Ver 1.0, 2019-04-30, mwl, Create file
 */
public class OrderEntity implements Serializable {


    /**
     * 借款金额
     **/
    public String approvedAmt;

    /**
     * 还款日期
     **/
    public String lastPayDate;

    /**
     * 订单号
     **/
    public String orderId;

    /**
     * 逾期天数
     **/
    public String overdueDay;

    /**
     * 借款期限
     */
    public String pTerm;

    /**
     * 借款日期
     */
    public String crtTime;
    /**
     * 逾期费用
     */
    public String overdueAmt;

    /**
     * 状态
     **/
    public int status;

    public String addressBookUuid;
    public String appName;
    public String appPackageName;
    public String appUserName;
    public String appVersion;
    public String applyAmt;
    public String attr5;
    public String attr6;
    public String attr7;
    public String attr8;
    public String backTime;
    public String channel;
    public String checkDate;
    public String checkFinishDate;
    public String checkFinishUser;
    public String checkOpinion;
    public String checkStatus;
    public String checkUserId;
    public String checkUserStatus;
    public String checkbaseUserName;
    public String crtHost;
    public String crtName;
    public String crtUser;
    public String extendedFlag;
    public String id;
    public String inviteCode;
    public int lateCharge;
    public String lendDate;
    public String lendUser;
    public int loanAmt;
    public int neteceipts;
    public int overdueInterest;
    public boolean partialRepaymentMark;
    public String proName;
    public int prodId;
    public String realRepayDate;
    public String rejectFlag;
    public String repayAmt;
    public String telOpinion;
    public String telStatus;
    public int totalAccountFee;
    public int totalCreditserviceFee;
    public int totalFee;
    public int totalInterest;
    public String updHost;
    public String updName;
    public String updTime;
    public String updUser;
    public int userId;
    public String userRealName;
    public String userSource;
    public String userSourceId;
    public String userUuid;

    public OrderEntity() {
    }

    public OrderEntity(String approvedAmt, String lastPayDate, String orderId, String overdueDay, String pTerm, String crtTime, String overdueAmt, int status) {
        this.approvedAmt = approvedAmt;
        this.lastPayDate = lastPayDate;
        this.orderId = orderId;
        this.overdueDay = overdueDay;
        this.pTerm = pTerm;
        this.crtTime = crtTime;
        this.overdueAmt = overdueAmt;
        this.status = status;
    }

    public String getPTerm() {
        return pTerm;
    }

    public void setPTerm(String pTerm) {
        this.pTerm = pTerm;
    }

    public String getCrtTime() {
        return crtTime;
    }

    public void setCrtTime(String crtTime) {
        this.crtTime = crtTime;
    }

    public String getApprovedAmt() {
        return approvedAmt;
    }

    public void setApprovedAmt(String approvedAmt) {
        this.approvedAmt = approvedAmt;
    }

    public String getLastPayDate() {
        return lastPayDate;
    }

    public void setLastPayDate(String lastPayDate) {
        this.lastPayDate = lastPayDate;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOverdueDay() {
        return overdueDay;
    }

    public void setOverdueDay(String overdueDay) {
        this.overdueDay = overdueDay;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getOverdueAmt() {
        return overdueAmt;
    }

    public void setOverdueAmt(String overdueAmt) {
        this.overdueAmt = overdueAmt;
    }

    public String getpTerm() {
        return pTerm;
    }

    public void setpTerm(String pTerm) {
        this.pTerm = pTerm;
    }

    public String getAddressBookUuid() {
        return addressBookUuid;
    }

    public void setAddressBookUuid(String addressBookUuid) {
        this.addressBookUuid = addressBookUuid;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getAppPackageName() {
        return appPackageName;
    }

    public void setAppPackageName(String appPackageName) {
        this.appPackageName = appPackageName;
    }

    public String getAppUserName() {
        return appUserName;
    }

    public void setAppUserName(String appUserName) {
        this.appUserName = appUserName;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public String getApplyAmt() {
        return applyAmt;
    }

    public void setApplyAmt(String applyAmt) {
        this.applyAmt = applyAmt;
    }

    public String getAttr5() {
        return attr5;
    }

    public void setAttr5(String attr5) {
        this.attr5 = attr5;
    }

    public String getAttr6() {
        return attr6;
    }

    public void setAttr6(String attr6) {
        this.attr6 = attr6;
    }

    public String getAttr7() {
        return attr7;
    }

    public void setAttr7(String attr7) {
        this.attr7 = attr7;
    }

    public String getAttr8() {
        return attr8;
    }

    public void setAttr8(String attr8) {
        this.attr8 = attr8;
    }

    public String getBackTime() {
        return backTime;
    }

    public void setBackTime(String backTime) {
        this.backTime = backTime;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getCheckDate() {
        return checkDate;
    }

    public void setCheckDate(String checkDate) {
        this.checkDate = checkDate;
    }

    public String getCheckFinishDate() {
        return checkFinishDate;
    }

    public void setCheckFinishDate(String checkFinishDate) {
        this.checkFinishDate = checkFinishDate;
    }

    public String getCheckFinishUser() {
        return checkFinishUser;
    }

    public void setCheckFinishUser(String checkFinishUser) {
        this.checkFinishUser = checkFinishUser;
    }

    public String getCheckOpinion() {
        return checkOpinion;
    }

    public void setCheckOpinion(String checkOpinion) {
        this.checkOpinion = checkOpinion;
    }

    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    public String getCheckUserId() {
        return checkUserId;
    }

    public void setCheckUserId(String checkUserId) {
        this.checkUserId = checkUserId;
    }

    public String getCheckUserStatus() {
        return checkUserStatus;
    }

    public void setCheckUserStatus(String checkUserStatus) {
        this.checkUserStatus = checkUserStatus;
    }

    public String getCheckbaseUserName() {
        return checkbaseUserName;
    }

    public void setCheckbaseUserName(String checkbaseUserName) {
        this.checkbaseUserName = checkbaseUserName;
    }

    public String getCrtHost() {
        return crtHost;
    }

    public void setCrtHost(String crtHost) {
        this.crtHost = crtHost;
    }

    public String getCrtName() {
        return crtName;
    }

    public void setCrtName(String crtName) {
        this.crtName = crtName;
    }

    public String getCrtUser() {
        return crtUser;
    }

    public void setCrtUser(String crtUser) {
        this.crtUser = crtUser;
    }

    public String getExtendedFlag() {
        return extendedFlag;
    }

    public void setExtendedFlag(String extendedFlag) {
        this.extendedFlag = extendedFlag;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public int getLateCharge() {
        return lateCharge;
    }

    public void setLateCharge(int lateCharge) {
        this.lateCharge = lateCharge;
    }

    public String getLendDate() {
        return lendDate;
    }

    public void setLendDate(String lendDate) {
        this.lendDate = lendDate;
    }

    public String getLendUser() {
        return lendUser;
    }

    public void setLendUser(String lendUser) {
        this.lendUser = lendUser;
    }

    public int getLoanAmt() {
        return loanAmt;
    }

    public void setLoanAmt(int loanAmt) {
        this.loanAmt = loanAmt;
    }

    public int getNeteceipts() {
        return neteceipts;
    }

    public void setNeteceipts(int neteceipts) {
        this.neteceipts = neteceipts;
    }

    public int getOverdueInterest() {
        return overdueInterest;
    }

    public void setOverdueInterest(int overdueInterest) {
        this.overdueInterest = overdueInterest;
    }

    public boolean isPartialRepaymentMark() {
        return partialRepaymentMark;
    }

    public void setPartialRepaymentMark(boolean partialRepaymentMark) {
        this.partialRepaymentMark = partialRepaymentMark;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public int getProdId() {
        return prodId;
    }

    public void setProdId(int prodId) {
        this.prodId = prodId;
    }

    public String getRealRepayDate() {
        return realRepayDate;
    }

    public void setRealRepayDate(String realRepayDate) {
        this.realRepayDate = realRepayDate;
    }

    public String getRejectFlag() {
        return rejectFlag;
    }

    public void setRejectFlag(String rejectFlag) {
        this.rejectFlag = rejectFlag;
    }

    public String getRepayAmt() {
        return repayAmt;
    }

    public void setRepayAmt(String repayAmt) {
        this.repayAmt = repayAmt;
    }

    public String getTelOpinion() {
        return telOpinion;
    }

    public void setTelOpinion(String telOpinion) {
        this.telOpinion = telOpinion;
    }

    public String getTelStatus() {
        return telStatus;
    }

    public void setTelStatus(String telStatus) {
        this.telStatus = telStatus;
    }

    public int getTotalAccountFee() {
        return totalAccountFee;
    }

    public void setTotalAccountFee(int totalAccountFee) {
        this.totalAccountFee = totalAccountFee;
    }

    public int getTotalCreditserviceFee() {
        return totalCreditserviceFee;
    }

    public void setTotalCreditserviceFee(int totalCreditserviceFee) {
        this.totalCreditserviceFee = totalCreditserviceFee;
    }

    public int getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(int totalFee) {
        this.totalFee = totalFee;
    }

    public int getTotalInterest() {
        return totalInterest;
    }

    public void setTotalInterest(int totalInterest) {
        this.totalInterest = totalInterest;
    }

    public String getUpdHost() {
        return updHost;
    }

    public void setUpdHost(String updHost) {
        this.updHost = updHost;
    }

    public String getUpdName() {
        return updName;
    }

    public void setUpdName(String updName) {
        this.updName = updName;
    }

    public String getUpdTime() {
        return updTime;
    }

    public void setUpdTime(String updTime) {
        this.updTime = updTime;
    }

    public String getUpdUser() {
        return updUser;
    }

    public void setUpdUser(String updUser) {
        this.updUser = updUser;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserRealName() {
        return userRealName;
    }

    public void setUserRealName(String userRealName) {
        this.userRealName = userRealName;
    }

    public String getUserSource() {
        return userSource;
    }

    public void setUserSource(String userSource) {
        this.userSource = userSource;
    }

    public String getUserSourceId() {
        return userSourceId;
    }

    public void setUserSourceId(String userSourceId) {
        this.userSourceId = userSourceId;
    }

    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    /**
     * 获取状态显示
     *
     * @param context
     * @return
     */
    public String getStatusShow(Context context) {
        switch (status) {
            case OrderStatus.STATUS_AUDIT:
                return context.getString(R.string.order_status_audit);
            case OrderStatus.STATUS_WAITLOAN:
                return context.getString(R.string.order_status_waitloan);
            case OrderStatus.STATUS_WAITREFUND:
                return context.getString(R.string.order_status_waitrefund);
            case OrderStatus.STATUS_REFUSEED:
                return context.getString(R.string.order_status_refuseed);
            case OrderStatus.STATUS_CLEARED:
                return context.getString(R.string.order_status_clear);
            case OrderStatus.STATUS_OVERDUE:
                return context.getString(R.string.order_status_overdue);
            case OrderStatus.STATUS_DEFER:
                return context.getString(R.string.order_status_defer);
            default:
                return "";
        }
    }



    public static class OrderStatus {

        /**
         * 审核中
         **/
        public static final int STATUS_AUDIT = 1;

        /**
         * 待放款
         **/
        public static final int STATUS_WAITLOAN = 2;

        /**
         * 已放款,待还款
         **/
        public static final int STATUS_WAITREFUND = 3;

        /**
         * 已拒绝
         **/
        public static final int STATUS_REFUSEED = 4;

        /**
         * 已结清
         **/
        public static final int STATUS_CLEARED = 5;

        /**
         * 已逾期
         **/
        public static final int STATUS_OVERDUE = 6;

        /**
         * 已展期
         **/
        public static final int STATUS_DEFER = 7;


    }
}
